import zrender from 'zrender/zrender'
import Droplet from 'zrender/graphic/shape/Droplet'

export default {
  mounted() {
    const zr = zrender.init(this.$refs.chart)
    const shape = new Droplet({
      shape: {
        cx : 380,
        cy : 300,
        width: 50,
        height: 70
      },
      style: {
        brushType: 'both',
        color: 'green',
        strokeColor: 'red',
        lineWidth : 8,
        text:'droplet',
        textPosition:'inside'
      },
      draggable : true
    })
    zr.add(shape)
  },

  render(h) {
    return (
      <div class="page">
        <div ref="chart" style="width: 100%; height: 600px"></div>
      </div>
    )
  }
}
